// 全局要用的类型放到这里

type IResData<T> = {
  code: number
  msg: string
  data: T
}

// uni.uploadFile文件上传参数
type IUniUploadFileOptions = {
  file?: File
  files?: UniApp.UploadFileOptionFiles[]
  filePath?: string
  name?: string
  formData?: any
}

type IUserInfo = {
  nickname?: string
  avatar?: string
  /** 微信的 openid，非微信没有这个字段 */
  openid?: string
  token?: string
  ClientId?: string
  name?: string
  roles?: any
  roleList?: any
  permissions?: string
  tenantId?: string
  userId?: string
  userName?: string
  userType?: string
  nickName?: string
  phonenumber?: string
  headshot?: string
  sex?: string
  status?: string
  deptId?: string
  email?: string
  age?: string
  schoolName?: string
}

enum TestEnum {
  A = 'a',
  B = 'b',
}

type loginInfo = {
  username?: string
  password?: string
  grantType?: string
  code?: string
  uuid?: string
  tenantId?: string
  clientId?: string
}

type CaptchaResponse = {
  img?: string
  captchaEnabled?: boolean
  uuid?: string
}

type userInfo = {
  user?: any
  roles?: any
  permissions?: any
}
